package windowFactoryPackage;

import javax.swing.*;
import java.awt.event.*;

public class ViewUserButton extends JButton{
	
	public ViewUserButton(){
		super("View User");
		this.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				for(int i = 0; i<ReviewWindow.userButtonList.size(); i++){
					if(e.getSource() == ReviewWindow.userButtonList.get(i)){
						System.out.println("ViewUserButton pressed at position " + i);
						SearchWindow.setSearch(Query.progReviewUserName.get(i), "u");
					}
				}
			}
		});
	}
}
